main()
{
	char s[8];
	for(gets(s);gets(s);puts(s))
	{
		sprintf(s,"%02d",s[0]+s[1]+s[2]+s[4]+s[5]+s[6]-288);
		sprintf(s,"%d",s[0]+s[1]-96);
	}
}
